package frame.laxcen.dataobject;

import frame.laxcen.response.Response_0010_10;

import java.util.Map;
import java.util.Objects;

public class DataObject_0010_10_RFID {

    // 标签 ECP 码
    private String ecp;

    // 标签 PC
    private String pcCode;

    // 天线 ID
    private String antennaId;

    // RSSI
    private String rssi;

    // 标签数据读取结果
    private String readResult;

    // 标签 TID 数据
    private String tid;

    // 标签用户数据区数据
    private String userData;

    // 标签保留区数据
    private String reservedData;

    public DataObject_0010_10_RFID(Map<String, String> map) {

        this.ecp = map.get("标签ECP码");

        this.pcCode = map.get("标签PC");

        this.antennaId = map.get("天线ID");

        this.rssi = map.get("RSSI");

        this.readResult = map.get("标签数据读取结果");

        this.tid = map.get("标签TID数据");

        this.userData = map.get("标签用户数据区数据");

        this.reservedData = map.get("标签保留区数据");
    }

    public String getEcp() {

        return ecp;
    }

    public String getPcCode() {

        return pcCode;
    }

    public String getAntennaId() {

        return antennaId;
    }

    public String getRssi() {

        return rssi;
    }

    public String getReadResult() {

        return readResult;
    }

    public String getTid() {

        return tid;
    }

    public String getUserData() {

        return userData;
    }

    public String getReservedData() {

        return reservedData;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        DataObject_0010_10_RFID that = (DataObject_0010_10_RFID) o;
        return Objects.equals(ecp, that.ecp) &&
                Objects.equals(antennaId, that.antennaId) &&
                Objects.equals(tid, that.tid) &&
                Objects.equals(userData, that.userData) &&
                Objects.equals(reservedData, that.reservedData);
    }

    @Override
    public int hashCode() {
        return Objects.hash(ecp, antennaId, tid, userData, reservedData);
    }
}
